﻿<html>
<script language="javascript">
var logdate,logname,logmode,logkind;
    function query(){
        logdate =document.form.logdate.value; 
        logname = document.form.logname.value;
        logmode = document.form.logmode.value;
        logkind =document.form.logkind.value;
        url = "/mon?logdate="+logdate+"&logname="+logname+"&logmode="+logmode+"&logkind="+logkind;
        window.location.href = url;
    }
   
    function ShowImage(id){
        var ywlx= document.getElementById('ywlx').value;
        var jylx= document.getElementById('jylx').value;
              if(ywlx=="9990000302"){
                 if (id=="1"){
                
                    document.getElementById('sncx').value="0";
                }else{
                    document.getElementById('sncx').value="1";
                    alert(document.getElementById('sncx').value);
                }
                 alert(document.getElementById('sncx').value);
                 
              }
        }

</script>
<SCRIPT language=javascript type=text/javascript src="/static/jquery-1.7.2.min.js"></SCRIPT>
<script type="text/javascript">
  function setDetailMsgRow(ywlx,sel) {
    alert('333');
    alert(ywlx);
    if (ywlx == 'P010031001'){
        alert(ywlx);
        var rowID=['yhkh_tr'];
        alert(rowID.length);
        for (var i=0;i<rowID.length;i++){ 
            
            var row = document.getElementById(rowID[i]); 
              if (row != null) { 
                alert(rowID[i]);
                alert(row.style.display );
                if (sel.value == 1) { 
                  row.style.display = "block";
                } 
                else { 
                   row.style.display = "none"; 
                }
                row.style.display = "block";
            } 
        }
        var rowID_None=['khmc_tr'];
        alert(rowID_None.length);
        for (var i=0;i<rowID_None.length;i++){ 
            
            var row = document.getElementById(rowID_None[i]); 
              if (row != null) { 
                alert(rowID_None[i]);
                row.style.display = "none";
            } 
        }    }
  } 
  /*自动加载隐藏框,ready方法必须要引用jquery的库*/
  $(document).ready(function(){ 
    var sel = document.getElementById('ywlx');
    setDetailMsgRow("P010031002",sel);
  });
  function onload() {var sel = document.getElementById('ywlx');
    setDetailMsgRow("P010031002",sel); 
  } 
</script>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>自动化测试</title>
</head>

<body style="text-align: center">

<form method="post" name="form" action="oatest_sub_kjzf">
	<p>自动化测试(发送环境:<select size="1" name="sendhost" id="fshost" tabindex="2">
			<option value="10.1.87.62"  {{ 'selected' if sendhost == "10.1.87.62" else '' }}>快捷支付准生产</option>
			<option value="10.1.89.130"  {{ 'selected' if sendhost == "10.1.89.130" else '' }}>网联开发</option>
			</select>)</p>                                                        
	<table border="1"  align="center" id="table1">
		<tr>
			<td width="82" align="right"><font size="2">业务类型</font></td>
			<td><select size="1" name="ywlx" id="ywlx" tabindex="2"  onchange = "setDetailMsgRow(document.getElementById('ywlx').value,this)">
			<option value="P010030001"  {{ 'selected' if ywlx == "P010030001" else '' }}>支付宝快捷支付</option>
			<option value="P010030003"  {{ 'selected' if ywlx == "P010030003" else '' }}>京东快捷支付</option>
			<option value="P010030004"  {{ 'selected' if ywlx == "P010030004" else '' }}>块钱快捷支付</option>
			<option value="P010030002"  {{ 'selected' if ywlx == "P010030002" else '' }}>腾讯快捷支付</option>
			<option value="P010031001"  {{ 'selected' if ywlx == "P010031001" else '' }}>网联</option>
			</select></td>
			<td width="82" align="right"><font size="2">交易代码</font></td>
			<td><select size="1" name="jylx" id="jylx" tabindex="8">
			<option value="qy" {{ 'selected' if jylx == "qy" else '' }}>签约</option>
			<option value="2" {{ 'selected' if jylx == "2" else '' }}>支付</option>
			<option value="3" {{ 'selected' if jylx == "3" else '' }}>退款</option>
			<option value="4" {{ 'selected' if jylx == "4" else '' }}>查询</option>
			<option value="5" {{ 'selected' if jylx == "5" else '' }}>解约</option>
			<option value="6" {{ 'selected' if jylx == "6" else '' }}>预签约</option>
			</select></td>
		</tr>
		<tr >
			<td width="82" align="right" id="cxzt_tr" style="display:none;"><font size="2">查询状态</font></td>
			<td><select size="0" name="cxzt" id="cxzt" tabindex="2" onchange="ShowImage(document.getElementById('cxzt').value);">
			<option value="1"  {{ 'selected' if cxzt == "1" else '' }}>单笔支付查询</option>
			<option value="2"  {{ 'selected' if cxzt == "2" else '' }}>单笔退款查询</option>
	
			</select></td>
			<td width="82" align="right"><font size="2"></font></td>
			<td><input type="text" id="sncx" name="sncx"></td>
		</tr>
		<tr >
			<td width="82" align="right" id="yhkh_tr" style="display:none;"><font size="2">卡号</font></td>
			<td id="yhkh_tr" style="display:none;">
            <select name="yhzhlx" id="yhzhlx" >
			<option value="D" {{ 'selected' if yhzhlx == "D" else '' }}>借记卡</option>
			<option value="C" {{ 'selected' if yhzhlx == "C" else '' }}>信用卡</option>
			</select>
            <input type="text" name="yhkh" id="textarea" cols="45" rows="1"value="{{yhkh}}"></input>
			<td width="82" align="right"><font size="2">证件号码</font></td>
			<td>
            <select name="zjlx" id="zjlx" >
			<option value="01" {{ 'selected' if zjlx == "01" else '' }}>身份证</option>
			<option value="02" {{ 'selected' if zjlx == "02" else '' }}>军官证</option>
			</select>
            <input type="text" name="zjhm" id="textarea" cols="45" rows="1" value="{{zjhm}}"></input>
		</tr>
		<tr >
			<td width="82" align="right" id="khmc_tr" style="display:none;"><font size="2">客户名称</font></td>
			<td>
            <textarea name="khmc" id="textarea" cols="45" rows="1" id="khmc_tr" style="display:none;">{{khmc}}</textarea>
			<td width="82" align="right"><font size="2">手机号码</font></td>
			<td>
            <textarea name="sjhm" id="textarea" cols="45" rows="1">{{sjhm}}</textarea>
		</tr>
		<tr >
			<td width="82" align="right" id="yzhlsh_tr" style="display:none;"><font size="2">原支付流水号（退款填）</font></td>
			<td>
            <textarea name="yzflsh" id="textarea" cols="45" rows="1" id="yzhlsh_tr" style="display:none;">{{yzflsh}}</textarea>
			<td width="82" align="right"><font size="2">原支付日期（退款填）</font></td>
			<td>
            <textarea name="yjyrq" id="textarea" cols="45" rows="1">{{yjyrq}}</textarea>
		</tr>
		<tr>
			<td width="82" align="right"><font size="2">交易金额（退款，支付）</font></td>
			<td>
            <textarea name="jyje" id="textarea" cols="45" rows="1">{{jyje}}</textarea>
			<td width="82" align="right"><font size="2">签约协议号</font></td>
			<td>
            <textarea name="qyxyh" id="textarea" cols="45" rows="1">{{qyxyh}}</textarea>
		</tr>
        
	</table>
    <p><p><p>
    <table border="1"  align="center" id="table2">
        <tr>
			<td width="82" align="right"><font size="2">交易日志</font></td>
			<td>
            <a href="{{jy_log}}" target="_blank">显示日志</a>
            </td>
			<!--input type="textarea" name="resp" size="20" value={{response}}></td-->
		</tr>
        <tr>
			<td width="82" align="right"><font size="2">响应报文</font></td>
			<td>
            <textarea id="textarea" cols="120" rows="18">{{response}}</textarea>
			<!--input type="textarea" name="resp" size="20" value={{response}}></td-->
		</tr>
	</table>

	<p>
    <button type="submit" class="submit_button">提交</button>
    <!--input  onClick="query()" type="button"  value="提交" name="B1"-->&nbsp;
	<input type="reset" value="重置" name="B2"></p>
	<p>　</p>
	<p>　</p>
	<p style="text-align: middle">版权所有(C) 2012-2017 平欣电子科技有限公司
	<a href="http://www.levelappro.com/">www.levelappro.com&nbsp;</a></p>
            <!--form action="" method="post" id="main_form">
                <input type="text" name="username" class="username" placeholder="请输入您的用户名！" />
                <input type="password" name="password" class="password" placeholder="请输入您的用户密码！" />
                <input type="Captcha" class="Captcha" name="Captcha" placeholder="请输入验证码！" />
				<a href="#" id="get_code_img"><img src="get_code" class="getcode" /></a>
                <button type="submit" class="submit_button">登录</button>
                <div class="error"><span>+</span></div>
            </form-->
		
</form>

</body>

</html>
